const cover = document.getElementsByClassName("cover")[0];
const items = document.querySelectorAll(".item a");

for (let item of items) {
	item.addEventListener("mouseover", (e) => {
		let top = e.target.offsetTop;
		let width = e.target.offsetWidth;
		cover.style.width = width + 20 + "px";
		cover.style.top = top + "px";
	});
}
